﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using TBR.Repositories;
using TBR.Entities;
using System.Windows.Media.Imaging;

namespace TBR
{
    public partial class PivotPage1 : PhoneApplicationPage
    {
        private ProfileRepository profileRepository = null;

        public PivotPage1()
        {
            InitializeComponent();
            profileRepository = new ProfileRepository();
            profileRepository.GetProfilePageCompleted += profileRepository_GetProfilePageCompleted;
        }

        private void profileRepository_GetProfilePageCompleted(object source, ProfileRepository.RequestEventArgs args)
        {
            uc_Profile.Profile = args.Profile;
        }

        private void MyProfileItem_Loaded(object sender, RoutedEventArgs e)
        {
            profileRepository.GetProfile();
        }




    }
}